Skip to main content

revDatabaseColumnCount

Type

function

Summary

Returns the number of database fields in a record set.

Syntax

revDatabaseColumnCount(<recordSetID>)

Description

Use the revDatabaseColumnCount function to find out how many database fields you must deal with in a record set.

If the operation is not successful, the revDatabaseColumnCount function returns an error message that begins with the string "revdberr".

note

Some database systems will not give the columm count until all the records in a record set have been fetched. This is for efficiency reasons. When the column count is not available the revDatabaseColumnCount will return a value of -1. This is currently applicable to Oracle databases and certain ODBC data sources.

Important

The revDatabaseColumnCount function is part of the Database library. To ensure that the function works in a standalone application, you must include this custom library when you create your standalone. In the Inclusions pane of the Standalone Application Settings window, make sure both the "Database" library checkbox and those of the database drivers you are using are checked.

Parameters

NameTypeDescription

recordSetID

The number returned by the revQueryDatabase function when the record set was created.

Examples

revDatabaseColumnCount(12)
revDatabaseColumnCount(the savedResultsPointer of this card)

control structure: function

function: revDatabaseColumnNames, revDatabaseColumnNumbered

glossary: LiveCode custom library, database field, Standalone Application Settings, standalone application, record set, return

keyword: string, integer

library: Database library

Compatibility and Support

Introduced

LiveCode 1.1

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?